package Demo3;

public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
//        Inner inner =new Inner(113);
//        Student student = new Student("zhangsan",18,inner);
//        System.out.println(student.toString());
//        Student student2 = (Student) student.clone();
//        System.out.println(student == student2);
//        System.out.println(student2.toString());
//        //地址不同了
//        System.out.println(student.equals(student2));
//
//
//        student.inner.classRoom = 114;
//        System.out.println(student2.toString());

        Person p1= new Person("zhangsan",18);
        Person p2= new Person("lisi",19);
//        System.out.println(p1 == p2);
//        System.out.println(p1.equals(p2));
        //error
//        System.out.println(p1>p2);
//        System.out.println(p1.compareTo(p2));

        ComparePerson comparePerson = new ComparePerson();
        System.out.println(comparePerson.compare(p1,p2));
    }
}
